<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=[];
        var sum=0;
        var pj=0;
        arr=[79,80,88,77,100,50,500]
        var max=arr[0];
        for(var i=1;i<arr.length;i++){
            if(max>arr[i]){
                max=max
            }
            else{
                max=arr[i]
            }
        }console.log('最大值'+max)
        for(var j=0;j<arr.length;j++){
            sum+=arr[j]
            pj=sum/arr.length
        }console.log('求和'+sum)
        console.log('平均'+pj)


    </script>
</body>
</html>